package com.cloud.shopping.druid.feign;

import com.cloud.shopping.tool.RespResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @author John.Zhang
 * @version Id: HotGoodsFeign, v 0.1 2021/2/8 9:25 ZhiYong Exp $
 */
@FeignClient(value = "shopping-druid")
public interface HotGoodsFeign {
    /**
     * 热门商品分析
     * @param size size
     * @param hour hour
     * @param max max
     * @param urls urls
     * @return List
     */
    @PostMapping(value = "/hot/goods/search/{size}/{hour}/{max}")
    RespResult<List<Map<String,String>>> searchHotGoods(@PathVariable("size")Integer size,
                                                        @PathVariable("hour")Integer hour,
                                                        @PathVariable("max")Integer max,
                                                        @RequestBody String[] urls);
}
